Tag Link | [String->CharDigitValue] | Category | String |
---|---|---|---|
Type | Member | Source Available | No |
Support | Preferred | Version | 7.0 |
Change | Unchanged | Data Source | Any |
Output Type | Integer | Security | None |
Implementation | LCAPI | Sets | Lasso 8.5, Lasso 8.0, Lasso 7.0 |
[String->CharDigitValue] returns the integer value of a specified character or -1 if the character is alphabetic. The character within the base string to be inspected is specified starting from 1 for the first character in the string.
[Output: '1'->(CharDigitValue: 1)]
<?LassoScript
Variable: 'myString' = '1000';
Variable: 'Result' = $myString->(CharDigitValue: 1);
?gt;
Required Parameters | |
---|---|
Position | The character within the string to inspect. |
To return the digit value for a character:
Use the [String->CharDigitValue] tag. The following example returns the integer value of the fourth character of a string.
[Output: '2001'->(CharDigitValue: 4)]
1